banner

Functions 03

OPENING QUESTION: Please compare 'global' variables to 'local' variables with your team. How do you create them? How are they useful, how might they be dangerous or unhelpful?

LEARNING TARGET: I will create a VERY basic function with local variables during today's class.

 

═══════════════════════════

WORDS O' THE DAY: Parameter

WORK O' THE DAY:

There's something kind of odd going on here. Please discuss

HERE is the code for the program: functionIntro

Let's revisit our conversations on local vs global variables and also why we won't be using the 'broadcast' block -- ever.

 

After all of that, let's have some fun.

Go online and find the image of a small ball and work with your team to import into SNAP as a 'costume'.

If time permits, work to move that ball around the stage.

After that, put that movement in a loop and work to 'bounce' that ball around the stage using the 'touching' blocks.